<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

	<head>
		<title>OpenLayers Reader</title>
		
		<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
	   	   		
   		<script type="text/javascript" src="../../resources/ext/ext-base.js"></script>
 		<script type="text/javascript" src="../../resources/ext/ext-all.js"></script>
 		
 		<script src="http://www.openlayers.org/api/2.10/OpenLayers.js"></script>
		
		<script type="text/javascript">
		Ext.onReady(function() {

		OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";	
    format = new OpenLayers.Format.WMSCapabilities();

		function load(url) {
    OpenLayers.Request.GET({
				url: url,
//        url: "http://sedac.ciesin.columbia.edu/mapserver/map/GPWv3",
        params: {
//            SERVICE: "WMTS",
//            VERSION: "1.0.0",
            REQUEST: "GetCapabilities"
        },
        success: function(request) {
            var doc = request.responseXML;
            if (!doc || !doc.documentElement) {
                doc = request.responseText;
            }
            var capabilities = format.read(doc);
						console.log(capabilities);
/*						
            var layer = format.createLayer(capabilities, {
                layer: "medford:buildings",
                matrixSet: "EPSG:900913",
                format: "image/png",
                opacity: 0.7,
                isBaseLayer: false
            });
*/						
//            map.addLayer(layer);
        }, 
        failure: function() {
            alert("Trouble getting capabilities doc");
            OpenLayers.Console.error.apply(OpenLayers.Console, arguments);
        }
    });
		}
			load("http://lagic-levee.lsu.edu/lagic/services/LawEnforcement/MapServer/WMSServer");
			load("http://sedac.ciesin.columbia.edu/mapserver/map/GPWv3");
			
		})
		</script>
	
		</script>		
</head>
</html>